import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:rjpb/components/z_modals/loading.dart';

class ZLoading {
  static void show({
    bool clickMaskDismiss = false,
  }) {
    SmartDialog.showLoading(
      msg: "",
      backDismiss: true,
      usePenetrate: false,
      clickMaskDismiss: clickMaskDismiss,
      builder: (_) {
        return const Loading();
      },
    );
  }

  static void hide() {
    SmartDialog.dismiss(
      status: SmartStatus.loading,
    );
  }
}
